Guild icon
S3Drive
Community / support / S3 endpoint and CORS setup
Avatar
Hi i just setup an s3 bucket on aws and struggling now with accessing it S3Drive app https://web.s3drive.app/loginS3. I created already the accesskey but where can i find the s3-enpoint for my bucket or how do i create it? Many thanks already for any help 🙂
S3Drive allows you to use any of the S3 compatible file storage (e.g. AWS, Backblaze, Wasabi, Scaleway, Storj, iDrive, MinIO etc.) as your Zero Knowledge E2E encrypted cloud storage.
Avatar
Morethanevil 8/3/2023 10:45 AM
The endpoint is the URL to connect You can see yours in the docs of AWS ☺https://docs.aws.amazon.com/general/latest/gr/rande.html
Find the endpoints for AWS services.
Avatar
Oh ok, cool thanks. But now i stumble into the next error ^^: "It seams that your bucket isnt configured for web. Please setup CORSE settings". And i can find those settings in my S3-bucket, but have no idea what hast to be there to work with S3Drive? Can you maybe help me also with that one 🥹
Avatar
Morethanevil 8/3/2023 1:03 PM
Enable cross-origin resource sharing by setting a CORS configuration on your bucket using the AWS Management Console, the REST API, or the AWS SDKs.
1:03 PM
Bookmark the aws docs, they are helpful if you run into trouble ☺
Avatar
yeah thought so too, and found that already. But which json construct do i need exactly for working with S3Drive? That is my problem currently
Avatar
ok, the following did the trick. GET must be also added to make it working. Thanks for your help ☺️ [ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "GET", "PUT", "POST", "DELETE" ], "AllowedOrigins": [ "https://web.s3drive.app" ], "ExposeHeaders": [] } ]
🎉 1
Avatar
Morethanevil 8/3/2023 2:40 PM
Thanks for sharing your solution 🌞
Avatar
Hi @Alex , In S3Drive there is a: "Set up CORS" button in the Settings menu which can set this up for you. At the moment we use this configuration, which is slightly too heavy due to legacy encryption that we still need to support. <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <ID>S3Drive</ID> <AllowedOrigin>https://web.s3drive.app</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>HEAD</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>DELETE</AllowedMethod> <MaxAgeSeconds>3600</MaxAgeSeconds> <ExposeHeader>etag</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-key</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-iv</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-cek-alg</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-wrap-alg</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-key-v2</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-tag-len</ExposeHeader> <ExposeHeader>x-amz-meta-x-amz-unencrypted-content-length</ExposeHeader> <ExposeHeader>x-amz-version-id</ExposeHeader> <ExposeHeader>x-amz-meta-key</ExposeHeader> <ExposeHeader>x-amz-meta-iv</ExposeHeader> <ExposeHeader>x-amz-meta-chunk</ExposeHeader> <ExposeHeader>x-amz-meta-cek-alg</ExposeHeader> <ExposeHeader>x-amz-meta-s3drive</ExposeHeader> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration> Please note that in your configuration there are at least couple things missing which may affect some features. For instance HEAD HTTP operation or: x-amz-version-id and x-amz-meta-s3drive (optional) headers. (edited)
👍 1
Tom changed the channel name: S3 endpoint and CORS setup 8/3/2023 4:53 PM
Avatar
Thanks for the solution. Yeah, as i tried first to setup it with the web-client, i could not access the settings-menu without atleast partly correct CORS settings set for the bucket. But did it now and it worked as i updated them with the "ExposeHeader" fields, etc...
Avatar
Avatar
Alex
Thanks for the solution. Yeah, as i tried first to setup it with the web-client, i could not access the settings-menu without atleast partly correct CORS settings set for the bucket. But did it now and it worked as i updated them with the "ExposeHeader" fields, etc...
Technically on the first web login without valid CORS you should've received an error message from S3Drive and prompt to set up the CORS with the link/button. Upon clicking on the prompt the: "Set up CORS" shall be routed through proxy managed by us to overcome CORS limitations on the browser side. If this hasn't happened, then either the CORS settings were partially there or we've failed to detect that. Do you mind sharing what S3 provider are you using?
Avatar
i think then smth went wrong. Cause yes i received the error message on the first weg login, but without the option for a link or button to setup CORS. It was really just the alert message on the buttom and clicking on it doesnt do anything. My S3 Provider is AWS and initially the CORS settings there were blank as i searched for it after the first try to login. And only after may partially correct CORS settings i could login and find then with your help the button in the settings to correct the CORS settings automatically.
Exported 13 message(s)
Timezone: UTC+0